home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-05-06 | 1.5 KB | 28 lines | [TEXT/MPS ] |
- This testing harness stuff supports two portability problems.
-
- 1) how do you tell the time? This is solved in Posix but we don't have those
- yet. Until then, you have to supply startclock/stopclock functions.
- 2) what is the fastest compiler? (or which compiler would you like to use?)
- again, no common answer.
-
- So, you wanna port this to a new system? Easy. First, pick a new
- system name, say ``poot''. You have to create a Mk/poot which specifies the
- compiler and options of your choice. Set COPT to be a flag like -O
- and if you need weird flags (like -g or something), set CFLAGS. And of course,
- if needed, set CC. These are all parts of a makefile.
-
- secondly, create a sys/poot.c, most likely by copying an existing
- such file. all it does is define startclock and stopclock and an integer ``hz''.
- stopclock has to return the number of ticks since startclock was called.
- there are hz ticks per second. For various unsatisfactory reasons, you also
- have to define a double ``tcmp''; set it to 3.3 unless you know better.
-
- that's it. now, executing ``runall poot'' will generate a timing
- run. if you accumulate a bunch, say 3 or 4, of these timing outputs,
- the shell script ``ave.times'' will convert them into a summarised form
- (which regrettably is only of much use to me). I would certainly
- appreciate getting such output, together with some details about the system.
-
- As always, I would also appreciate hearing about suggestions
- and bugs, preferably by email to andrew@research.att.com.
-